Skip to content

feat: SDK update for version 26.2.0#158

Merged
ChiragAgg5k merged 1 commit into
mainfrom
dev
Jun 9, 2026
Merged

feat: SDK update for version 26.2.0#158
ChiragAgg5k merged 1 commit into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jun 8, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 26.2.0.

What's Changed

  • Added: Device Authorization Grant params (verificationUrl, userCodeLength, userCodeFormat, deviceCodeDuration) to updateOAuth2Server
  • Added: authorizationDetailsTypes (RFC 9396) param to updateOAuth2Server in project
  • Added: userAccessedAt param to updateMembershipPrivacyPolicy in project
  • Added: email classification attributes (emailCanonical, emailIsFree, emailIsDisposable, emailIsCorporate, emailIsCanonical) to User
  • Added: userAccessedAt attribute to Membership
  • Added: dedicatedDatabases.execute to ProjectKeyScopes
  • Updated: Replaced HTTP transport with undici for requests and self-signed certs

@ChiragAgg5k ChiragAgg5k changed the title feat: Node.js SDK update for version 26.2.0 feat: SDK update for version 26.2.0 Jun 8, 2026
@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Node.js SDK to version 26.2.0, migrating the HTTP transport from node-fetch-native-with-agent to undici, adding 'accept': 'application/json' headers across all services, and introducing new API surface for OAuth2 device flow (Device Authorization Grant), email canonical/classification fields, and membership privacy userAccessedAt.

  • Transport migration: undici replaces node-fetch-native-with-agent; the self-signed TLS agent is now lazily instantiated as a per-client undici.Agent and destroyed when setSelfSigned(false) is called.
  • OAuth2 device flow: updateOAuth2Server gains authorizationDetailsTypes, verificationUrl, userCodeLength, userCodeFormat, and deviceCodeDuration; however, authorizationDetailsTypes is inserted mid-sequence in the deprecated positional overload, silently shifting accessTokenDuration and later parameters for any caller still using the old positional form.
  • Model additions: new optional email fields (emailCanonical, emailIsFree, emailIsDisposable, emailIsCorporate, emailIsCanonical) on User; userAccessedAt on Membership; device-flow fields on the project model.

Confidence Score: 3/5

Safe to merge for net-new callers; existing users of the deprecated positional overload of updateOAuth2Server who pass accessTokenDuration or later arguments will silently send wrong values.

The positional overload of updateOAuth2Server now has authorizationDetailsTypes inserted between scopes and accessTokenDuration. Any JavaScript caller who was passing token-duration values positionally will have those values bound to the wrong parameters with no error — the wrong payload is sent to the server silently. All 26 remaining service files are routine header additions and new endpoint additions that look correct.

src/services/project.ts — the deprecated positional overload parameter order change; src/client.ts — agent teardown timing during concurrent uploads.

Important Files Changed

Filename Overview
src/client.ts Migrates HTTP transport from node-fetch-native-with-agent to undici; the selfSignedAgent is now lazily created and stored per-client instance, with a potential issue when destroying an agent while requests are in flight.
src/services/project.ts Adds OAuth2 device flow parameters and membership privacy userAccessedAt field; inserts authorizationDetailsTypes mid-sequence in the deprecated positional overload, breaking existing callers who supplied accessTokenDuration positionally.
src/models.ts Adds optional email canonical/classification fields to User, userAccessedAt to Membership, and OAuth2 device-flow fields to the project model.
src/inputFile.ts Updates File import from node-fetch-native-with-agent to undici, consistent with the transport migration in client.ts.
src/enums/project-key-scopes.ts Adds DedicatedDatabasesExecute = 'dedicatedDatabases.execute' enum member.
package.json Bumps version to 26.2.0 and swaps dependency from node-fetch-native-with-agent to undici ^6.26.0.
test/client.test.js New test file verifying the dispatcher is absent by default and present for self-signed requests, using undici mock.
src/services/databases.ts Adds 'accept': 'application/json' header to all endpoints; no logic changes.
src/services/messaging.ts Adds 'accept': 'application/json' header and new messaging endpoints consistent with the 26.2.0 API spec.
src/services/account.ts Adds 'accept': 'application/json' header to all endpoints; no logic changes.
src/services/users.ts Adds 'accept': 'application/json' header and new user-related methods consistent with 26.2.0 API spec.

Reviews (1): Last reviewed commit: "chore: update Node.js SDK to 26.2.0" | Re-trigger Greptile

Comment thread src/services/project.ts
Comment thread src/client.ts
@ChiragAgg5k ChiragAgg5k merged commit 846d0d6 into main Jun 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants